declare@iReturnint /* ** Create the user object if it does not exist already */ begintransaction select@iReturn=objectidfromdbo.dtpropertieswhereproperty=@vchProperty if@iReturnISNULL begin insertdbo.dtproperties(property)VALUES(@vchProperty) updatedbo.dtpropertiessetobjectid=@@identity whereid=@@identityandproperty=@vchProperty select@iReturn=@@identity end commit return@iReturn GO GRANTEXECUTEON[dbo].[dt_adduserobject_vcs]TO[public] GO